package com.qf.homework.vo;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;


public class ResultVo extends HashMap<String, Object> {

    public ResultVo(String code, Object msg) {
        put("code", code);
        put("msg", msg);
    }
    public ResultVo() {

    }
    public static ResultVo success(){
        return new ResultVo("0","success");
    }
    public static ResultVo success(Object msg){
        return new ResultVo("0",msg);
    }

    public static ResultVo fail(){
        return new ResultVo("-1","fail");
    }
    public static ResultVo fail(String msg){
        return new ResultVo("-1",msg);
    }


}
